const path = require('path');
const VueAutoRouteWebpackPlugin = require('vue-auto-routes-webpack-plugin')

function resolve(_path) {
	return path.resolve(__dirname, _path);
}
module.exports = {
	chainWebpack(config) {
		config.plugin("VueAutoRouteWebpackPlugin").use(VueAutoRouteWebpackPlugin, [{
			entry: resolve("src/views/"),
			output: resolve("src/router/routes.js"),
			rootComponent: "Login",
			indexComponent: "Index",
			useFileName: true
		}]);
	}
}
